package com.zlb.sms.service.impl;

import com.zlb.sms.dao.StudentDao;
import com.zlb.sms.pojo.*;
import com.zlb.sms.service.StudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Resource
    StudentDao dao;
    @Override
    public int Login(Student student) {
        Student stu = dao.Login(student);
        if (stu != null){
            return 1;
        }
        return 0;
    }

    @Override
    public List<College> getCollegeInfo() {
        return dao.getCollegeInfo();
    }



    @Override
    public List<ClassName> getClassInfo() {
        return dao. getClassInfo();
    }

    @Override
    public List<Major> getMajorInfo() {
        return dao.getMajorInfo();
    }

    @Override
    public int addStudent(Student student) {
        return dao.addStudent(student);
    }

    @Override
    public List<StudentVo> getStudentInfo() {
        return dao.getStudentInfo();
    }

    @Override
    public int delStudentById(int id) {
        return dao.delStudentById(id);
    }

    @Override
    public int updateStudent(Student student) {
        return dao.updateStudent(student);
    }
}
